package hk.edu.uic.hejing.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author hejing
 * @since 2017-05-30
 */
@SuppressWarnings("serial")
public class Rule extends Model<Rule> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
	@TableField("rubricid")
	private Integer rubricid;
	@TableField("name")
	private String name;
	@TableField("percentage")
	private Integer percentage;

	@Override
	public String toString() {
		return "Rule{" +
				"id=" + id +
				", rubricid=" + rubricid +
				", name='" + name + '\'' +
				", percentage=" + percentage +
				'}';
	}

	public Rule() {
	}

	public Rule(Integer rubricid, String name, Integer percentage) {
		this.rubricid = rubricid;
		this.name = name;
		this.percentage = percentage;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getRubricid() {
		return rubricid;
	}

	public void setRubricid(Integer rubricid) {
		this.rubricid = rubricid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getPercentage() {
		return percentage;
	}

	public void setPercentage(Integer percentage) {
		this.percentage = percentage;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}
